public class Player {
	Property[] p;
	private String name; //name - for the player's name; token - path to image for the token
	int money, currentPosition, destination, lastRoll; //money - the player's money; currentPosition - the player's current position; destination - get value from block numbers; lastRoll - the last value returned by the dice
	private boolean active; //active - if the player is still active or bankrupt
	private boolean inJail;
	private String img;
	private int doubleRoll, jailRollCount;
	private boolean hasChanceCard;   //int if more than one
	private boolean hasCommunityCard;
	private int hasGetOutOfJailCard, playerCount;
	private boolean landedOnChance;
	
	public Player(int cPlayer){
		name = "Whoever";
		img = "None";
		money = 1500;
		currentPosition = 0;
		this.setDoubleRoll(0);
		this.inJail=false;
		this.playerCount=cPlayer;
		this.jailRollCount=0;
		this.hasChanceCard=false;
		this.hasCommunityCard=false;
		this.active=true;
		this.landedOnChance=false;
		this.hasGetOutOfJailCard=0;
	}
	
	public Player(String s, String icon){//Change Token t to String image
		this.name = s;
		this.money = 1500;
		this.img = icon;
		this.setDoubleRoll(0);
		this.inJail=false;
		this.jailRollCount=0;
		this.hasChanceCard=false;
		this.hasCommunityCard=false;
		this.active=true;
		this.landedOnChance=false;
		this.hasGetOutOfJailCard=0;
	}

	//getters and setters
	public String getName(){
		return this.name;
	}
	public void setName(String s) {
		this.name = s;
	}
	public void setIcon(String icon) {
		this.img = icon;
	}
	public String getIcon() {
		return img;
	}
	public int getMoney(){
		return this.money;
	}
	public void setMoney(int pera){
		this.money = pera;
	}
	
	public int getCurrentPosition(){
		return this.currentPosition;
	}
	
	public void setCurrentPosition(int pos){
		this.currentPosition = pos;
	}
	
	public int getDestination(){
		return this.destination;
	}
	
	public void setDestination(int d){
		this.destination = d;
	}
	
	public int getLastRoll(){
		return this.lastRoll;
	}
	
	public void setLastRoll(int lr){
		this.lastRoll = lr;
	}
	
	public void setActive(boolean b){
		this.active = b;
	}
	
	public boolean getActive(){
		return this.active;
	}
	
	public void subtractMoney(int price){
		this.setMoney(this.getMoney() - price);
	}
	
	public void addMoney(int price){
		this.setMoney(this.getMoney() + price);
	}

	public void setDoubleRoll(int doubleRoll) {
		this.doubleRoll = doubleRoll;
	}

	public int getDoubleRoll() {
		return doubleRoll;
	}
	
	public void setInJail(boolean b){
		this.inJail=b;
	}
	
	public boolean getInJail(){
		return inJail;
	}

	public int getJailRollCount() {
		return jailRollCount;
	}

	public void setJailRollCount(int jailRollCount) {
		this.jailRollCount = jailRollCount;
	}

	public void setHasChanceCard(boolean hasChanceCard) {
		this.hasChanceCard = hasChanceCard;
	}

	public boolean isHasChanceCard() {
		return hasChanceCard;
	}

	public void setHasCommunityCard(boolean hasCommunityCard) {
		this.hasCommunityCard = hasCommunityCard;
	}

	public boolean isHasCommunityCard() {
		return hasCommunityCard;
	}

	public void setLandedOnChance(boolean landedOnChance) {
		this.landedOnChance = landedOnChance;
	}

	public boolean isLandedOnChance() {
		return landedOnChance;
	}

	public void setHasGetOutOfJailCard(int hasGetOutOfJailCard) {
		this.hasGetOutOfJailCard = hasGetOutOfJailCard;
	}

	public int getHasGetOutOfJailCard() {
		return hasGetOutOfJailCard;
	}
	
	public int getPlayerCount(){
		return playerCount;
	}
}
